package com.topisv.tms.repository.lightShelf;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.lightShelf.LightShelf;

/**
 * 灯光架_DAO
 * @author ch
 *
 */
public abstract interface LightShelfDao extends PagingAndSortingRepository<LightShelf, Long>, JpaSpecificationExecutor<LightShelf>
{

	@Query("select t from LightShelf t where t.warehouseCode=? and t.status=?")
	List<LightShelf> loadLightShelf(String warehouseCode,String status);

	@Query("select t from LightShelf t where t.customerCode=?1 and t.warehouseCode=?2 and t.shelfCode=?3")
	LightShelf loadLightShelfByCondition(String customerCode,String warehouseCode, String shelfCode);

	@Query("select t from LightShelf t where t.shelfCode=?")
	LightShelf loadLightShelfByShelfCode(String shelfCode);
}